(function($, owner) {
	owner.httpPost = function(url, parms) {
		var res;
		mui.ajax(url, {
//			 contentType: "application/json;",
//			dataType: 'json', //服务器返回json格式数据
			type: 'post', //HTTP请求类型
			async: false,
			data: parms,
			timeout: 10000, //超时时间设置为10秒；

			success: function(respone) {
				res = respone;
			},
			error: function(xhr, type, errorThrown) {
				//异常处理；
				console.log(type);
			}
		});
		return res;
	}

	owner.httpGet = function(url, parms) {
		var res;
		mui.ajax(url, {
			data:parms,
			async: false,
			dataType: 'json', //服务器返回json格式数据
			type: 'get', //HTTP请求类型
			success: function(respone) {
				res = respone;
			},
			error: function(xhr, type, errorThrown) {
				//异常处理；
				console.log(type);
			}
		});
		return res;
	}
}(mui, window.requestService = {}));